import yaml
import os
from config import DIR_PATH
from common.configManager import local_config

def get_yaml_data(dir,file):
    file_name = os.path.join(DIR_PATH,local_config.data_path(),dir,file)
    # 打开文件
    f = open(file_name, "r", encoding="utf-8")
    # 以yaml语法格式加载数据
    res = yaml.load(f, yaml.FullLoader)
    f.close()
    return res
if __name__ == '__main__':
    print(get_yaml_data("addUser","username.yaml"))
